Skip to content

Conversation

@link2xt
Copy link

@link2xt link2xt commented Jun 15, 2020

This makes cargo geiger happy.

This makes `cargo geiger` happy.
//! buffer or `Reader` (thanks to the change of `Value::Undefined`
//! and `Value::Ascii` described above).
#![forbid(unsafe_code)]
Copy link

@itudoben itudoben Jun 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why unsafe code should be forbidden?

From geiger crate author, it looks like it's up to the user to decide.
It is, however, the opinion of the author of this project that libraries choosing to abstain from unsafe Rust usage when possible should be promoted.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't use unsafe code, then you should forbid it, as it makes cargo geiger's job easier, it makes it clearer that you're not using unsafe anywhere, and there are some things that are unsafe but you don't put an unsafe keyword around, and forbid(unsafe_code) forbids those.

Of course, if you do need unsafe code for a good reason, you can't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants